'; window.popUpWin.document.write(zhtm); window.popUpWin.document.close(); // Johnny Jackson 4/28/98 } //--> Inside AutoCAD 14 -- Ch 13 -- External References


Inside AutoCAD 14

Previous chapterNext chapterContents


- 13 -

External References


by Bill Burchard

External references, or xrefs, are a powerful feature of AutoCAD. They provide the capability to create composite drawings from other drawings, even while those other drawings are being edited. In a multidisciplinary work environment, you can attach another discipline's drawings to see the impact their design will have on your design. The drawings can be attached temporarily, or inserted permanently as a block. You can permanently insert the entire xref, or just its dependent symbols. With Release 14's new xref features, you can attach an entire xref or just the portions you need to review. You can even define an irregularly shaped polygon as the clipping boundary for the portion of the xref you want to attach. By attaching small portions of an xref, you can dramatically reduce regen times. Other new features include the new External Reference dialog box and the capability to temporarily unload an xref while maintaining its path in the current drawing. These new features make AutoCAD's xref capabilities even more powerful and versatile and can dramatically increase your productivity.

This chapter discusses the following subjects:

Introducing General XREF Features

External references are similar in behavior to blocks. The major difference is that blocks are inserted permanently into the current drawing, whereas xrefs are only attached to a drawing. Consequently, xrefs can be easily unattached when they are no longer needed.

When Should You Use Xrefs?

Use xrefs when the objects in external drawings that you need to view are undergoing change. Blocks should be used to insert small static, or unchanging, external drawings, whereas xrefs should be used to attach dynamic or changing drawings. The latest copy of an xreffed drawing is inserted automatically when you open a drawing; to update blocks, however, you must redefine them. During an editing session, you can reload the xref to update the reference to reflect the most recent condition of the xref. Also, use xrefs instead of blocks when the attached drawing is large. By using new features described later in this chapter, you can insert only the small portion of an xref you need, thereby reducing regen time.

Inserting an Xref: Attach versus Overlay

You can xref a drawing two different ways. You can attach it to the current drawing, or you can overlay it. Both methods enable you to turn layers on and off or to freeze and thaw layers. Both enable you to change the color and linetypes of layers of xreffed drawings. What's the difference?

Advantages and Disadvantages of Attaching Xrefs

Originally, the only way an xref could be loaded into a drawing was by attaching it. This feature was very useful when you wanted to view an existing drawing in the current drawing without actually making it a permanent part of the current drawing, and it gave xrefs an advantage over blocks.

In a typical civil engineering firm, for example, the architectural department is responsible for a building's layout, and the engineering department is responsible for the grading plan layout. Each department needs to insert the other's drawings from time to time to make sure that the architect's building layout matches the grading plan's building pad. By temporarily attaching the drawing as an xref, each department can view the latest design of the other department, and each can determine the effect on its drawing of any new modifications to the design. This feature is very useful.

Unfortunately, inconveniences can occur with attaching xrefs. A typical grading plan, for example, must show the existing conditions as well as the new design's contours and elevations. The existing buildings and roads to be removed and the existing contours and elevations are all necessary to the design of the project and must be part of the grading plan. The architect does not need to view the existing conditions along with the proposed design, however. Not only does the additional xref data make the proposed grading design more difficult for the architect to discern, but it also increases regen time.

Overlaying Xrefs

Overlaying is useful in reducing the amount of xref data loaded into a drawing. In the preceding example, by creating a drawing of the existing conditions only and loading it into the grading plan, overlayed as an xref, the needs of the engineer are met. The engineer can view the existing conditions and design the grading plan. More important, when the architect inserts the grading plan by attaching it as an xref, only the grading plan is visible. Even though the existing-condition drawing is technically a nested xref in the grading plan, it is not inserted into the architect's drawing because it was overlayed in the grading plan. As a consequence, the architect can view only the new grading design and, at the same time, the engineer can view the existing conditions.

If you need to load an xref drawing into your current drawing, and there is a chance that another person may load your drawing into his or hers, consider loading the xref you need as an overlay. This overlay enables you to view the xref and enables other people to load your drawing and avoid loading unwanted nested xrefs.

The following exercise demonstrates the difference between attaching and overlaying an xref.

ATTACHING VERSUS OVERLAYING AN XREF

1. Open the 13DWG01c.DWG drawing file on the accompanying CD to display a tentative tract map consisting of right-of-way lines, property lines, street centerlines, and proposed building pads.

Next, you insert two xrefs. One is attached, and the other is overlayed.


2. From the Insert menu, choose External Reference and then click on Attach.

The Select File to Attach dialog box opens.

3. From the Select File to Attach dialog box, open the 13DWG01a.DWG drawing file.

4. In the Attach Xref dialog box, under Reference Type, choose Overlay.

5. Under Parameters, clear any checked Specify On-screen check boxes.

6. Click on OK.

AutoCAD displays the existing contours.

7. From the Insert menu, choose External Reference and then click on the Attach button.

The Attach Xref dialog box opens.

8. Click on the Browse button.

9. From the Select File to Attach dialog box, open the 13DWG01b.DWG drawing file.

10. In the Attach Xref dialog box, under Reference Type, choose Attachment.

11. Under Parameters, clear any checked Specify On-screen check boxes.

12. Click on OK.

AutoCAD displays the existing trees. Your drawing should now look like figure 13.1.

Figure 13.1 The two xrefs, attached and overlayed in the current drawing.

13. Save the file in the ACADR14\SAMPLE directory.

14. Open the 13DWG01d.DWG drawing file on the accompanying CD to display the building footprints of the architect's drawing.

Next, you insert the tentative tract map drawing, with its two xrefs.


15. From the Insert menu, choose External Reference and then click on the Attach button.

The Select File to Attach dialog box opens.

16. From the Select File to Attach dialog box, open the 13DWG01c.DWG drawing file from the ACACR14\SAMPLE directory.

17. In the Attach Xref dialog box, under Reference Type, choose Attachment.

18. Under Parameters, clear any checked Specify On-screen check boxes.

19. Click on OK.

AutoCAD displays the xreffed drawing. Note that the nested tree xref displays, but that the nested contour xref does not. This occurs because the contour drawing was overlayed, whereas the tree drawing was attached to the tentative tract map drawing. Your drawing should resemble figure 13.2.

20. Save the file in the ACADR14\SAMPLE directory.

Figure 13.2 The nested tree xref displays, but the nested contour xref does not.

By using the attach and overlay features as shown in the preceding exercise, you can easily manage the visibility of xreffed drawings.

Permanently Inserting an Xref: Bind versus Xbind

Occasionally, you must make an xref drawing a permanent part of the current drawing so that you can edit its objects. This can be accomplished by binding the xref to the current drawing (inserting the entire xref into the drawing as a block). Then you can explode the block and manipulate its individual objects.

For example, during the life cycle of a project, your office may use xrefs to manage a project's drawing files. When the project is finished, however, if you are required to deliver the drawing files to the client, the client may not accept any drawings that have xrefs attached. Consequently, you will be required to bind the xrefs permanently to the drawing files.

New to Release 14 is the Bind Type feature. When an xref is bound to a drawing, AutoCAD places the xref's objects on existing layers of the same name in the current drawing. This feature eliminates the redundancy of duplicate layer names.

On certain occasions, however, it is useful to only bind an xref's dependent symbols (blocks, dimension styles, layers, linetypes, and text styles) without also permanently binding all the xref's objects. You can accomplish this with the XBIND command.

Suppose, for example, that you have attached an xref to a current drawing. You intend to leave the xref attached for a short time only and then detach it. After the xref is attached, you notice that some of its text objects are using a text style that you want to use in the current drawing. This can be accomplished easily with the XBIND command.

The following exercise demonstrates how to use XBIND to attach an xrefs-dependent text style.

XBINDING A DEPENDENT TEXT STYLE

1. Start a new drawing.

Next, you attach an xref drawing that contains the Simplex text style.


2. From the Insert menu, choose External Reference, and then click on the Attach button.

The Select File to Attach dialog box opens.

3. From the Select File to Attach dialog box, open the 13DWG02.DWG drawing file on the accompanying CD.

4. In the Attach Xref dialog box, under Reference Type, choose Attachment.

5. Under Parameters, clear any checked Specify On-screen check boxes.

6. Click on OK.

AutoCAD attaches the xref, and the text appears in the current drawing.

Next, you use XBIND to insert the dependent text style.


7. From the Modify menu, choose Object, External Reference, Bind. The Xbind dialog box appears (see fig. 13.3).

8. Double-click on the highlighted xref name.

Figure 13.3 The Xbind dialog box.

AutoCAD displays the five dependent symbol headings in the xreffed drawing's symbol table. Notice that a small box containing a plus sign is next to two of the symbol headings.

9. Click on the box with the plus sign next to the Textstyle heading.

AutoCAD displays two dependent text style symbols.

10. Choose the 13DWG02|SIMPLEX text style symbol.

The selected text style symbol is highlighted.

11. Click on the Add button.

The highlighted text style symbol appears in the Definitions to Bind text box.

12. Click on OK.

13. From the Format menu, choose Text Style. The Text Style dialog box opens.

14. Under Style Name, open the drop-down list and look at the available style names.

Notice that the text style 13DWG02$0$SIMPLEX is listed as a selection, as shown in figure 13.4. This is the standard way AutoCAD names a dependent symbol that it binds to the current drawing.


Figure 13.4 The dependent text style symbol is now inserted into the current drawing.



NOTE: XBIND does not permit you to load dependent data from the view table into the current drawing.

By using AutoCAD's Bind and Xbind features, you can permanently insert the entire xref, or just insert specific dependent symbols, such as text style and linetypes.

Using Release 14's XREF Enhancements

The newest release of AutoCAD offers some welcome enhancements for working with xrefs. The following are among the improvements you will find in dealing with xrefs in Release 14:

With these new features, AutoCAD's improved external referencing capabilities will increase your productivity.

Clipping Boundaries

AutoCAD has a new command called XCLIP. With this command, you can use rectangles and irregularly shaped polygons to define clipping boundaries for xrefs. The polygons can be created on the fly or by selecting an existing 2D polyline. After the clipping boundary has been chosen, AutoCAD removes from display that portion of the xref that lies outside the clipping boundary.


NOTE: The XCLIP command replaces the XREFCLIP command.

The following exercise demonstrates how to use the Select Polyline feature of the XCLIP command to define the xref clipping boundaries with a polygon.

USING THE SELECT POLYLINE FEATURE OF THE XCLIP COMMAND

1. Open the 13DWG03b.DWG drawing file on the accompanying CD.

The 13DWG03a.DWG drawing file is already attached as an xref. It is the drawing with the contours (the wavy lines).

In the following steps, you use the Select Polyline feature of the XCLIP command to clip the xref with an irregular polygon.


2. From the Modify menu, choose Object, Clip.

3. Select the xref and then press Enter.

4. Press Enter to accept the New boundary default.

5. Enter S to choose Select polyline.

6. Select the large, green polyline.

AutoCAD determines the limits of the clipping boundary and then redisplays only the portion of the xref that is inside the clipping boundary (see fig. 13.5).


Figure 13.5 The clipped xref with boundaries determined by the chosen polyline.

7. Save the file in the ACADR14\SAMPLE directory.

The preceding exercise demonstrated how to use the Select Polyline feature of the XCLIP command. In some cases, however, defining only one clipping boundary for the xref may not be enough. The following section leads you through the necessary steps to create multiple boundaries.

Creating Multiple Clipping Boundaries

One limitation of the XCLIP feature is that an xref can have only one clipping boundary. But what if you want to clip the same xref with more than one polygon? How do you create multiple clipping boundaries? One answer is to insert the same xref more than once.

The following exercise demonstrates how to use two separate polygons to create two clipping boundaries for the same xref.

USING TWO SEPARATE POLYGONS TO CREATE MULTIPLE CLIPPING BOUNDARIES FOR THE SAME XREF

1. Continue with the 13DWG03b.DWG drawing from the previous exercise.

2. From the Format menu, choose Rename. The Rename dialog box appears.

3. In the Named Object text box, choose Block.

The xref drawing name 13DWG03a should appear in the Items text box. AutoCAD enables you to change this name.

4. Select the xref name 13DWG03a in the Items text box. The name now appears in the Old Name text box.

5. In the text box below the Old Name text box, type BIG-POLY.

6. Click on the Rename To button. The new xref name BIG-POLY appears in the Items text box.

7. Click on OK.

Next, attach the same xref drawing, as follows:


8. From the Insert menu, choose External Reference and then click on the Attach button.

The Attach Xref dialog box opens.


9. Click on the Browse button.

The Select File to Attach dialog box opens.


10. From the Select File to Attach dialog box, open the 13DWG03a.DWG drawing file on the accompanying CD.

11. In the Attach Xref dialog box, under Reference Type, choose Attachment.

12. Under Parameters, clear any checked Specify On-screen check boxes.

13. Click on OK. AutoCAD attaches the xref again.

Next, use the Select Polyline feature of the XCLIP command to clip the xref by selecting the small rectangular polygon, as shown in the following steps:


14. From the Modify menu, choose Object, Clip.

15. Select the xref in the area inside the small, green rectangle and then press Enter.

Because the first xref has been clipped and can be selected only from inside the large polygon, you guarantee that you are choosing the correct xref to clip by selecting inside the small rectangle.


16. Press Enter to accept the New boundary default.

17. Enter S to choose Select polyline.

18. Select the small, green rectangle.

AutoCAD determines the limits of the clipping boundary and then redisplays only the portion of the xref that is inside the clipping boundary (see fig. 13.6).


Figure 13.6 The same xref is inserted and clipped twice.

19. Save the drawing.


TIP: As an alternative to reinserting the xref under a different name, you can make a copy of it with the COPY command. Just insert the copy in the same X,Y,Z position as the original. If you use this method, the xref should be copied before using the XCLIP command the first time. Note the display will not change until both areas have been clipped.


TIP: The xref can be renamed from the External Reference dialog box. Simply highlight the xref to be renamed and then hold down the left mouse button for a couple of seconds. When you release the left mouse button, the highlighted name will appear as a boxed area and the name can be changed.


NOTE: The XCLIP command also clips blocks.

Demand Loading

Demand Loading, a feature new with Release 14, works in conjunction with layer and spatial indexes and enhances AutoCAD's performance by reducing regen times.

Demand Loading is a system variable, named XLOADCTL, that instructs AutoCAD to take advantage of layer and spatial indexes that exist in xrefs. By enabling Demand Loading (setting XLOADCTL to either 1 or 2), AutoCAD loads only objects on layers that are thawed when the xref has layer indexes and loads only objects within the clipping boundary when the xref has spatial indexes.

Layer and Spatial Indexes

AutoCAD has another new system variable, called INDEXCTL, that controls layer and spatial indexing. By enabling this variable, performance can be enhanced by reducing the regen times of drawings with xrefs. The following table shows the variable's four settings and their effects.

Setting Effect
0 Both layer and spatial indexing disabled
1 Only layer indexing enabled
2 Only spatial indexing enabled
3 Both layer and spatial indexing enabled


NOTE: Setting the INDEXCTL system variable to a value other than 0 enables layer or spatial indexing (or both). Consequently, when the drawing is saved, AutoCAD adds to it the additional layer and spatial index data, thereby increasing the drawing file's size.

When layer indexing is enabled, AutoCAD does not load an xref's objects residing on layers that are frozen in the current drawing. When spatial indexing is enabled, AutoCAD will not load an xref's objects that reside outside the clip boundary. In both cases, fewer objects are brought into the current drawing, and regen times are reduced.

Spatial indexes work three dimensionally by defining a front and back clipping plane. The front and back clipping plane is defined via the XCLIP's commands Clipdepth feature. By creating a clipping boundary and specifying the Clipdepth, you can greatly limit the xref objects that AutoCAD loads into the current drawing session.

Layer and spatial indexes are created in a drawing when the INDEXCTL system variable is set to the desired value and the drawing is then saved. If INDEXCTL is set to 3, for example, both layer and spatial indexes are created when the current drawing is saved. The indexes are saved with the drawing. Consequently, if you attach the drawing as an xref to a new drawing that has demand loading enabled, AutoCAD uses the xref's layer and spatial indexes to load only those objects that are on thawed layers and lie inside the clipping boundary.


NOTE: Layer and spatial indexes are available only with Release 14 drawings. Previous releases of AutoCAD do not create layer and spatial indexes when drawings are saved.


TIP: Leave the INDEXCTL system variable set to its default value of 0. Set the variable to a value other than 0 only when the file you are saving is to be used as an xref; then, after saving the file, reset the variable to a value of 0. This process ensures that other drawings you open will not be saved with layer and spatial indexing, and thereby reduces the file's size.

Circular Xrefs

With Release 14, AutoCAD now has the capability to handle circular xrefs. This means that an xref that has the current drawing attached to it as an xref can also be attached to the current drawing as an xref. In earlier releases, AutoCAD would issue a warning and abort the XREF command. Now, AutoCAD loads the xref up to the point where the circularity exists. It stops at the point of circularity because a drawing cannot load itself as an xref into itself.

In a previous exercise, for example, you attached a tentative tract map to an architect's building plan so that you could compare the building pad sizes with the building footprints. With Release 14's new circular xref enhancements, the tentative tract map drawing can xref the building footprint drawing at the same time the building footprint drawing xrefs the tentative tract map.

The following exercise demonstrates the new circular xref feature.

CREATING A CIRCULAR EXTERNAL REFERENCE

1. Open the 13DWG01c.DWG drawing file from the ACADR14\SAMPLE directory.

The drawing opens and displays a tentative tract map.

The next step is to insert the building footprints drawing.


2. From the Insert menu, choose External Reference, and then click on the Attach button.

The Attach Xref dialog box opens.

3. Click on the Browse button.

4. From the Select File to Attach dialog box, open the 13DWG01d.DWG drawing file from the ACADR14\SAMPLE directory.

5. In the Attach Xref dialog box, under Reference Type, choose Attachment.

6. Under Parameters, clear any checked Specify On-screen check boxes.

7. Click on OK.

AutoCAD displays the AutoCAD Alert warning box (see fig. 13.7), which indicates that you are about to create a circular external reference and asks whether you want to continue.

Figure 13.7 The AutoCAD Alert warning box.

8. Click on Yes.

AutoCAD attaches the circular xref, as shown in figure 13.8. Notice that AutoCAD displays the following message: Breaking circular reference from 13DWG01D to current drawing. AutoCAD stops loading a circular xref at the point at which it becomes circular. Consequently, if the newly attached drawing contains any xrefs of its own, those xrefs will not be loaded. In the case of circular references, AutoCAD will not load any nested xrefs past the point of circularity.

Figure 13.8 The circular xref.

9. Save the file in the ACADR14\SAMPLE directory.

So far, this section has discussed several improved features of Release 14 relating to xrefs. Another new system variable, PROJECTNAME, enables you to create multiple project names with different xref search paths.

Using PROJECTNAME to Specify Xref Search Paths

Release 14 has a new system variable, called PROJECTNAME, that stores the current project name. The project name file contains search paths for xrefs. You can create multiple project names, each of which contains a specific set of xref search paths. When you type PROJECTNAME at the Command: prompt, AutoCAD displays the current project name and enables you to enter a new name. AutoCAD then makes the search paths contained in the new project name file current. Consequently, when AutoCAD searches for an xref, it includes the paths listed in the current project name file.

AutoCAD saves the project name with the drawing, but does not save the search paths contained in the project name file with the drawing. These search paths must be explicitly defined in AutoCAD by using the Preferences dialog box. Therefore, a drawing can be loaded with a PROJECTNAME variable that is not explicitly defined. AutoCAD does not issue a warning that the folder name is not defined and that no xref search paths exist. Users are responsible for creating the project name file and for defining the search paths in the Preferences dialog box so that AutoCAD can take advantage of this feature.

This feature provides the ability to have multiple paths stored in different project name files. When a particular set of search paths is needed, just those paths are loaded and used for the current drawing. This avoids having to define all possible paths and have them all load for each drawing.

Additionally, all search paths are organized in separate files. This includes search paths for support files, device drivers, and print spoolers. Instead of searching through potentially hundreds of search paths to determine if the correct path already exists, existing paths can easily be determined by viewing the appropriate path folder.


NOTE: When AutoCAD searches for xrefs, it searches first for hard-coded paths, then PROJECTNAME search paths, and finally AutoCAD's default search paths.

The following exercise demonstrates how to add, remove, and modify project name search paths.

ADDING, REMOVING, AND MODIFYING PROJECT NAME SEARCH PATHS

1. Start a new drawing.

2. From the Tools menu, choose Preferences, and then select the Files tab.

3. Double-click on the Project Files Search Path title. A subdirectory appears beneath the title. If you have not yet defined any project names, the only subdirectory listed is empty.

4. To create a project name, choose the Project Files Search Path folder and then click on the Add button. AutoCAD creates a new folder with the title Project1. This name is ready to be edited.

5. Type the new project name, Path One, and press Enter. AutoCAD creates the new project name (see fig. 13.9).

Figure 13.9 The new project name, Path One, is displayed.

6. With the Path One project name still highlighted, click on the Add button. AutoCAD creates a new search path directory. You can either type a search path or browse for a search path.

7. Click on the Browse button. The Browse for Folder dialog box appears.

8. Browse for any folder in your list and then click on OK. AutoCAD returns to the Preferences dialog box and displays the selected path.

9. To save the project name and its search paths, click on the OK or Apply button.

You can add as many paths as necessary to each project name, and you can create as many project names as necessary.

The Move Up and Move Down buttons enable you to control the order in which the search paths appear under the project name; when AutoCAD uses the project name to search for xrefs, it follows this order.

The Remove button removes project names and their search paths.

When a project name is highlighted, click on the Set Current button to set the PROJECTNAME variable to the highlighted name. The highlighted project name's search paths then become the current paths AutoCAD uses to find xrefs.

The last new xref-related feature discussed here is the UNLOAD command, which is used in conjunction with RELOAD to remove an xref from or reload it into the current drawing.

The UNLOAD and RELOAD Commands

With Release 14, the XREF command has a new feature called UNLOAD, which removes an xref from the current drawing, but leaves its path. To insert the drawing again, use the XREF command's RELOAD feature. RELOAD reinserts an unloaded xref or updates a loaded xref.


TIP: Loaded xrefs can significantly increase regen times. If you are editing a drawing and do not need to see a loaded xref, use the UNLOAD command to remove it temporarily from the drawing. This will increase your productivity.

Managing Xrefs

The advantage of using xrefs is that they provide the capability to create composite drawings that have relatively small file sizes and are easily updated. Unfortunately, on large projects involving multiple disciplines, keeping track of xref drawings can be difficult. Proper xref management is critical to ensure that composite drawings can find the latest versions of xrefs on stand-alone stations or over networks. Features available in AutoCAD can make managing xrefs easier to do. By using these features, you save time and reduce errors on your project.

The New Release 14 Xref Dialog Box

With the latest release of AutoCAD comes the new External Reference dialog box. This new feature is a welcome improvement for anyone who uses xrefs daily. Previously, xref manipulations could take place only from the command line. The command line version is still available, but the new External Reference dialog box makes the task of managing xrefs easier. The dialog box's diagrams and intuitive button commands are great visual aids, as is its display of such pertinent data as the xref's name, current load status, whether the xref is attached or overlayed, and the xref's file size and last modification date.

Displaying Xrefs with List View versus Tree View

When the new Tree View feature is selected, it displays any nested xrefs that may exist and a diagram of the hierarchy of xrefs. This capability makes it easy to see which xrefs have been attached and how they relate to one another.


NOTE: The Tree View feature is one of the features I like most. It instantly displays a visual diagram of xrefs and any nested xrefs. More importantly, the nested xrefs are actually shown attached to their parent xref. This enhancement is a welcome improvement over how previous releases of AutoCAD simply listed nested xrefs as being attached to the current drawing, when in reality they were attached to another xref drawing.

The following exercise demonstrates the new Tree View feature.

ACCESSING TREE VIEW DISPLAY

1. Open the 13DWG04a.DWG drawing file on the accompanying CD.

The drawing contains two xrefs, each of which also contains two xrefs. When the drawing opens, the hierarchy of the xrefs and nested xrefs displays.

2. From the Insert menu, choose External Reference. The External Reference dialog box opens. Initially, it opens in List View mode. Two buttons appear in the upper-left corner of the dialog box. The one on the left, the List View button, is grayed. The one on the right is the Tree View button.


TIP: In List View mode, you can sort the xrefs in the display box in ascending or descending order. This is true for any of the displayed data. To sort, choose a column's title bar. AutoCAD sorts the data in ascending order based on the selected column. Select the column's bar again to sort the data in descending order.

3. Click on the Tree View button.

The text box below the buttons changes and now displays the hierarchy of the xrefs (see fig. 13.10). From this display, you can easily manage the xrefs. For example, you can unload a nested xref that is no longer needed.

4. In the External Reference dialog box, choose XREF1A.

Figure 13.10 The External Reference dialog box for the Tree View display.

Several buttons in the External Reference dialog box become active, and the xrefs path and drawing file name appear (see fig. 13.11).

5. Click on the Unload button.

Figure 13.11 The dialog box's buttons become active when XREF1A is selected.

6. Click on OK.

AutoCAD unloads the nested xref XREF1A and redisplays the drawing (see fig. 13.12).

Figure 13.12 The drawing's display after the nested xref XREF1A is unloaded.



NOTE: The best way to eliminate display of unwanted nested xrefs is to overlay an xref, but you can achieve the same effect--reducing regen time--by unloading an unwanted nested xref.


WARNING: Xref-dependent symbol names in the current drawing can be only 31 characters long. This can cause problems when you are using long file names for drawings to be used as xrefs.

Explicit and Implicit XREF Paths

An xref's path can be defined explicitly or implicitly. Explicit paths typically refer to a particular hard drive and include all the subdirectories that indicate the location of the xref file. Implicit paths contain only a partial subdirectory path and end with the xref's file name.

The advantage of implicit paths is that the partial path data is saved with the drawing. If the drawing is opened on another workstation, AutoCAD will successfully resolve the xref as long as the implicit path hierarchy exists at the new workstation.

For example, suppose that a drawing lies in the following directory:

D:\WORK\JOB-ONE\13DWG05A.DWG

Also suppose that this drawing has an xref attached that lies in the following directory:

D:\WORK\JOB-ONE\XREFS\13DWG05B.DWGT

This xref path is explicitly defined. While you edit the 13DWG05A.DWG file at the original workstation, AutoCAD can successfully resolve the xref because it will find it in the explicit path.

But what happens if the drawing and xref are moved to another workstation? Suppose that the files are moved to the following hard drive and directory:

D:\ACADR14\SAMPLE\13DWG05A.DWG
D:\ACADR14\SAMPLE\XREFS\13DWG05B.DWG

The 13DWG05A.DWG file can still be opened in AutoCAD on the new workstation, but if the xref's path is not in a normal search path, AutoCAD issues the following error message:

Resolve Xref XREF1: D:\WORK\JOB-ONE\XREFS\13DWG05b.dwg
Can't find D:\WORK\JOB-ONE\XREFS\13DWG05b.dwg

AutoCAD opens the 13DWG05B.DWG drawing without the xref (which it could not find). To avoid this problem, you can redefine the xref's path implicitly.

IMPLICITLY DEFINING AN XREF'S PATH

1. Create a new directory folder called XREFS in the ACADR14\SAMPLE subdirectory.

2. Copy the 13DWG05A.DWG drawing file on the accompanying CD into the ACADR14\SAMPLE subdirectory.

3. Copy the 13DWG05B.DWG drawing file on the accompanying CD into the ACADR14\SAMPLE\XREFS subdirectory.

4. Open the 13DWG05A.DWG drawing file from the ACADR14\SAMPLE directory.

The drawing opens, and then issues the warning that it can't find the xref.

5. From the Insert pull-down menu, choose External Reference. The External Reference dialog box appears (see fig. 13.13). Notice that the XREF1 drawing file is listed as an xref, but its status is Not Found.

Figure 13.13 AutoCAD does not find the XREF1 file.

6. Select the Reference Name XREF1. The Xref Found At text box becomes active.

7. Choose the Browse button next to Xref Found At. The Select new path dialog box opens.

8. Open the 13DWG05B.DWG drawing file from the ACADR14\SAMPLE\XREFS directory.

The display returns to the External Reference dialog box and the xref's path is now displayed in the Xref Found At text box (see fig. 13.14).

Figure 13.14 The XREF1 file is now displayed in the Xref Found At text box.

Notice that the XREF1 status is still Not Found.

9. Click on the Reload button. The XREF1 status changes to Reload (see fig. 13.15). It is important to note that the xref has not yet been reloaded.

Figure 13.15 The XREF1 file status is now listed as Reload.

10. Click on the OK button.

AutoCAD reloads the xref. While this accomplished the task of finding and loading the xref, the method just used will need to be repeated on every workstation the files are moved to. To avoid redefining the path, use the XREF command from the Command: line to create an implicit search path, as follows:

11. Type -XREF at the Command: prompt, and press Enter.

12. Next, type P to change the xref's path, and press Enter.

13. Then, type the name of the xref, XREF1, and press Enter.

AutoCAD displays the xref's old path and prompts for the new path.

14. Type the partial path where the xref is located, as follows: XREFS\13DWG05B.DWG, and then press Enter.

AutoCAD redefines the explicit path as implicit, and then reloads the xref.

15. From the Insert pull-down menu, choose External Reference.

The External Reference dialog box appears (see fig. 13.16). Notice that the XREF1 drawing file status is Loaded, and the Saved Path is implicitly defined as XREF\13DWG05B.DWG.

Figure 13.16 The XREF1 file status is now listed as Loaded and its saved path is defined implicitly.

By using the preceding technique to define xref paths implicitly, you can avoid the problem of unresolved xrefs when transferring drawing files from one workstation to another.

Xref Layers, Colors, and Linetypes

When an xref is attached to the current drawing, AutoCAD duplicates the xref's layer names in the current drawing. AutoCAD prefixes the layer names with the xref's name, followed by the pipe symbol (|). Then, AutoCAD assigns these new layers the same colors and linetypes as those in the xref drawing.

The only time AutoCAD does not assign the same colors and linetypes as those in the xref is when the objects are created on layer 0 in the xref. Just like blocks, these xref objects have special properties. If their color and linetype properties are set to BYLAYER, they assume the color and linetype of the layer on which the xref is inserted. If their color and linetype properties are set to BYBLOCK, they assume the color and linetype properties that are currently defined for the creation of new objects in the current drawing. Finally, if their color and linetype properties are explicitly defined, those properties remain fixed.

You can change the color and linetypes of an xref. These changes appear in the current drawing and do not affect the color and linetypes in the original xref file. After you exit the drawing, however, any changes to the color and linetype properties are lost. When the drawing is opened again, the color and linetypes assume the settings in the original xref.


TIP: To save any changes you make to an xref layer's color and linetype properties with the current drawing, set the system variable VISRETAIN to 1. This enables the current drawing to restore the changes you made to the xref layer's color and linetype properties in a previous editing session.

Summary

In this chapter, you learned about the differences between attaching and overlaying xrefs and about the differences between binding and xbinding xrefs. The new xref-related features of Release 14, including how to create clipping boundaries with the new XCLIP command, were discussed. You learned how to increase productivity with demand loading and spatial and layer indexes. The improved way AutoCAD deals with circular xrefs was covered, as was the new PROJECTNAME system variable, and the way it stores xref's paths. You also learned about the new External Reference dialog box and its Tree View and new xref UNLOAD features.

AutoCAD 14's new xref capabilities are a powerful tool. You can save regen time and increase your productivity by using these new xref features to reduce the number of xref objects loaded into a drawing and to better manage xrefs and nested xrefs.


Previous chapterNext chapterContents

© Copyright, Macmillan Computer Publishing. All rights reserved.